﻿using System;
using SqlSugar;
using MySql.Data;

namespace DemoDB
{
    internal class Program
    {
        static void Main(string[] args)
        {
            var db = new DB().Client;

        }
    }

    public class DB
    {
        public SqlSugarClient Client { get; set; }

        public DB()
        {
            ConnectionConfig config = new ConnectionConfig()
            {
                ConnectionString = "server=localhost;Database=demodb;Uid=root;Pwd=root",
                DbType = DbType.MySql,
                IsAutoCloseConnection = true
            };

            Client = new SqlSugarClient(config);
        }
    }
}
